package com.dd.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

@Data
public class PurchaseOrdersVO {
    /**
     * 订单ID
     * 用于唯一标识一个订单
     */
    private String orderId;

    /**
     * 供应商ID
     */
    private Integer supplierId;

    /**
     * 供应商名称
     * 用于记录订单对应的供应商名字
     */
    private String supplierName;

    /**
     * 总金额
     * 记录订单的总金额，单位为元
     */
    private Double totalAmount;



    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime createdAt;

    /**
     * 状态
     * 0表示未发货，1表示发货中，2表示已发货，3表示已收货
     */
    private Integer status;
    /**
     * 子订单集合
     */
    private List<PurchaseOrdersVO> purchaseOrdersVOList;
}
